#ifndef __LAUNCHER_OVERLAY__
#define __LAUNCHER_OVERLAY__

#include "frameui/framewnd.h"
#include "shared.h"

class OverlayPainter;
class OverlayWindow : public Window
{
  OverlayPainter* painter;
  SharedData* data;
  int resizing;
  POINT resizePrev;
  int scrollTop;
  int display;

  bool showReply;
  bool hoverReply;

  DWORD hookThreadId;
  HANDLE hHookThread;

  static OverlayWindow* instance;
  static DWORD WINAPI HookThread(LPVOID param);
  static LRESULT CALLBACK MouseHookProc(int nCode, WPARAM wParam, LPARAM lParam);
  static LRESULT CALLBACK KeyboardHookProc(int nCode, WPARAM wParam, LPARAM lParam);
  bool onMouseEvent(unsigned long msg, MSLLHOOKSTRUCT const* mh);
  bool onKeyEvent(unsigned long msg, KBDLLHOOKSTRUCT const* kb);

  HDC hBitmapDC;
  HBITMAP hBitmap;
  int bitmapWidth, bitmapHeight;
public:
  OverlayWindow(OverlayPainter* painter, bool interactive);
  ~OverlayWindow();

  void update(HDC hDC);
  void setInteractive(bool interactive);
};

#endif // __LAUNCHER_OVERLAY__
